package com.example.idepluginlearn;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.util.List;

public class TauntDialog extends DialogWrapper {

    private JLabel label;

    protected TauntDialog() {
        super(true);
        setTitle("每天一个小提示!");
        init();
    }

    @Override
    protected @Nullable JComponent createCenterPanel() {
        JPanel panel = new JPanel();
        label = new JLabel("第一天小提示!");
        panel.add(label);
        return panel;
    }




    @Override
    protected JComponent createSouthPanel() {
        JPanel panel = new JPanel();
        JButton button = new JButton("在干一碗");
        button.addActionListener(e-> {
            label.setText("2222222");
        });
        panel.add(button);
        return panel;
    }
}

